<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    .tab {
      width: 500px;
      height: 500px;
      border: 1px solid #000;
      margin: 0 auto;
      overflow: hidden;
    }

    .tab-wrapper {
      height: 50px;
      border-bottom: 1px solid #000;
    }

    .tab-item {
      float: left;
      width: 25%;
      height: 100%;
      text-align: center;
      line-height: 50px;
    }

    .tab-wrapper .active {
      color: #fff;
      background-color: #000;
    }

    .tab .page-wrapper {
      position: relative;
      width: 100%;
      height: 450px;
    }

    .tab.fade .inner {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }

    .tab.slide .inner {
      position: absolute;
      top: 0;
      left: 0;
      width: 2000px;
      height: 100%;
      transition: transform 0.2s;
    }

    .page-item {

      width: 500px;
      height: 450px;
      line-height: 450px;
      font-size: 80px;
      text-align: center;

    }

    .tab.fade .page-item {
      position: absolute;
      display: none;
      top: 0;
      left: 0;
    }

    .tab.fade .page-wrapper .active {
      display: block;
    }

    .tab.slide .page-item {
      float: left;
    }

    /* .tab.fade .page-wrapper .active {
      display: block;
    } */
  </style>
</head>

<body>

  <div class="tab">
    <div class="tab-wrapper">
      <div class="tab-item active">选项一</div>
      <div class="tab-item">选项二</div>
      <div class="tab-item">选项三</div>
      <div class="tab-item">选项四</div>
    </div>
    <div class="page-wrapper">
      <div class="inner">
        <div class="page-item  active">页面一</div>
        <div class="page-item ">页面二</div>
        <div class="page-item">页面三</div>
        <div class="page-item">页面四</div>
      </div>
    </div>
  </div>
  <script type="module" src="./src/index.ts"></script>
  <script>
    //    // const tab = new Tab({
    // //   el: ".tab",
    // //   type: "fade",
    // // });

    // const tab = new Tab({
    //   el: ".tab",
    //   type: "slide",
    // });
    // tab.create();
  </script>
</body>

</html>